STEP 4: Our loop is making five legs, but we only see one! We need to space them apart across the x-axis.

We can increment (increase) the value of legs_x each time the loop runs by using the += assignment. This adds the number to the right of the += to the variable legs_x each time the loop runs!

  • In the LOGIC tab, go to and drag Add Value inside the loop. Make sure it is indented!
  • Change my_var to legs_x and change the integer 1 to 100.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)